import * as LifeService from "../services/CommonHttpService";
import {store} from "utils/index";
import Const from "./Const";
export default  {
  SERVER: !!localStorage.getItem("SERVER") ? localStorage.getItem("SERVER") : '192.168.1.127',
  SERVER_PORT: !!localStorage.getItem("SERVER_PORT") ? localStorage.getItem("SERVER_PORT") : '8086',
  get baseUrl() {
    return `${this.USE_HTTPS ? 'https' : 'http'}://${this.SERVER}:${this.SERVER_PORT}/`;
  },

  DEVICE_SERVER: !!localStorage.getItem("DEVICE_SERVER") ? localStorage.getItem("DEVICE_SERVER") : '192.168.1.127',
  DEVICE_SERVER_PORT: !!localStorage.getItem("DEVICE_SERVER_PORT") ? localStorage.getItem("DEVICE_SERVER_PORT") : '8086',
  get deviceUrl() {
    return `${this.USE_HTTPS ? 'https' : 'http'}://${this.DEVICE_SERVER}:${this.DEVICE_SERVER_PORT}/`;
  },

  DATA_SERVER: !!localStorage.getItem("DATA_SERVER") ? localStorage.getItem("DATA_SERVER") : '192.168.1.127',
  DATA_SERVER_PORT:  !!localStorage.getItem("DATA_SERVER_PORT") ? localStorage.getItem("DATA_SERVER_PORT") : '8086',
  get dataUrl() {
    return `${this.USE_HTTPS ? 'https' : 'http'}://${this.DATA_SERVER}:${this.DATA_SERVER_PORT}/`;
  },
};
